package com.cjt.controller;
import com.cjt.common.lang.R;
import com.cjt.common.vo.TeaEditScoreVo;
import com.cjt.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/tea")
public class TeasController {

    @Autowired
    TeacherService teacherService;

    @GetMapping ("/getStus")
    public R getStus(){
        return R.success(teacherService.getStus());
    }


    @GetMapping("/listSubject/{id}")
    public R listSubject(@PathVariable Long id) {
        return R.success(teacherService.listSubject(id));
    }
    @GetMapping("/teaSubjectlist")
    public R listSubject() {
        return R.success(teacherService.getTeacherSubList());
    }

    @PostMapping("/editScore")
    public R editScore(@RequestBody TeaEditScoreVo teaEditScoreVo) {
        teacherService.editScore(teaEditScoreVo);
        return R.success(null);
    }
}
